#include <cstdlib>
#include <iostream>
#include "math.h"
#include "metodos.h"

using namespace std;
int main(int argc, char *argv[])
{
    int terminosDeGregory;      
    cout << "Ingrese la cantidad de terminos que desea sumar:";    
    cin >> terminosDeGregory ;   
   
    float res = SerieDeGregory(terminosDeGregory);
    cout << "Res:" << res << endl;
    double Res2 = SerieDeGregoryDouble(terminosDeGregory);
    cout << "Res2:" << Res2 << endl; 
    system("PAUSE");
    system("CLS");
    
    cout << "---------------Formula de Machin---------------" << endl;
    int n;
    int m;
    cout << "Ingrese la cantidad de terminos que desea sumar en el arctg(1/5):";    
    cin >> n; 
    cout << "Ingrese la cantidad de terminos que desea sumar en el arctg(1/239) :";
    cin >> m;    
    float res_Machin_float = Machin(n, m);
    cout << "res_Machin_float:" << res_Machin_float << endl;
    double res_Machin_double = MachinDouble(n, m);
    cout << "res_Machin_double:" << res_Machin_double << endl;
    
    
    system("PAUSE");
    system("CLS");
    
    cout << "---------------Serie de Remanujan---------------" << endl;
    int terminosRamanujan;      
    cout << "Ingrese la cantidad de terminos que desea sumar:";    
    cin >> terminosRamanujan ;   
    float resRamanujan = Ramanujan(terminosRamanujan);
    cout << "Res:" << resRamanujan << endl;
    float Ramanujan_double = RamanujanDouble(terminosRamanujan);
    cout << "Ramanujan_double:" << Ramanujan_double << endl;  
  
    system("PAUSE");
  
    
      

    return EXIT_SUCCESS;

}

